<template>
	<view>
		<u-tabbar :value="showModal" @change="change1" :fixed="true" :placeholder="false" :safeAreaInsetBottom="false">
			<u-tabbar-item text="首页" icon="home" @click="hones(ons='home')"></u-tabbar-item>

			<u-tabbar-item text="我的" icon="account" @click="hones(ons='personal')"></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		name: "tabbar",
		props: {
			showModal: {
				type: Number,
				default: 0
			}
		},
		data() {
			return {
				// currentTab: showModal
			};
		},
		onLoad() {
			console.log("tabbar")
		},
		methods: {
			hones(ons) {
				switch (ons) {
					case 'home':
						uni.redirectTo({
							url: '/pages/index/index'
						})
						break
					case 'personal':
						uni.redirectTo({
							url: '/pages/personal/personal'
						})
						break
						
						break
				}
			},
			change1() {

			}
		}
	}
</script>

<style>

</style>
